package com.cloud.adrian.novel.user.controller.inner;

import com.cloud.adrian.novel.common.constant.ApiRouterConstants;
import com.cloud.adrian.novel.common.resp.RestResp;
import com.cloud.adrian.novel.user.dto.resp.UserInfoRespDto;
import com.cloud.adrian.novel.user.service.UserService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: xiangguiliang
 * @version: 1.0
 * @since: 2024/05/23
 */
@Tag(name = "InnerUserController", description = "内部调用-用户模块")
@RestController
@RequestMapping(ApiRouterConstants.API_INNER_USER_URL_PREFIX)
@RequiredArgsConstructor
public class InnerUserController {
    private final UserService userService;

    /**
     * 批量查询用户信息
     */
    @Operation(description = "批量查询用户信息")
    @PostMapping("listUserInfoByIds")
    public RestResp<List<UserInfoRespDto>> listUserInfoByIds(@RequestBody List<Long> userIds) {
        return userService.listUserInfoByIds(userIds);
    }
}
